{% extends "../base.html" %}

{% block title %} Projects {% endblock %}

{% block header %} Projects {% endblock %}

{% block content %}
    <form action="/projects" method="get">
        <input type="text" name="qName"></input>
        <input type="submit" value="Find"></input>
    </form>
    
    <table cellpadding="0" cellspacing="0" class="list">
    	<thead>
    		<th>Name</th>
    		<th>Created by</th>
    		<th>Created at</th>
   		</thead>
    {% for project in projects %}
        <tr> 
            <td><a href="/tasks?projectId={{ project.project.key }}">{{ project.project.name }}</a></td>
            <td><a href="/tasks?projectId={{ project.project.key }}">{{ project.project.creator.nickname }}</a></td>
            <td><a href="/tasks?projectId={{ project.project.key }}">{{ project.project.createdAt.day }}.{{project.project.createdAt.month}}.{{project.project.createdAt.year}} {{project.project.createdAt.hour}}:{{project.project.createdAt.minute}}</a></td>
        </tr>
    {% endfor %}
    </table>
    <a href="/createProject">Create new project</a>
  
{% endblock %}
